package o;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;

public final class dmo {
    private ThreadPoolExecutor ˊ = null;
    private AtomicInteger ˋ;
    private ThreadPoolExecutor ˏ = null;

    public dmo(String str) {
        this.ˏ = new ThreadPoolExecutor(0, 1, 10, TimeUnit.SECONDS, new LinkedBlockingQueue(), new dmu("Serial" + str));
        this.ˊ = new ThreadPoolExecutor(0, 4, 10, TimeUnit.SECONDS, new PriorityBlockingQueue(), new dmu("Concurrent" + str));
        this.ˋ = new AtomicInteger();
    }

    public void ॱ(dmi o_dmi) {
        ˋ(new dmr(dmp.SERIAL, dmn.NORMAL, o_dmi));
    }

    public void ˊ(dmp o_dmp, dmi o_dmi) {
        ˋ(new dmr(o_dmp, dmn.NORMAL, o_dmi));
    }

    public void ˋ(dmr o_dmr) {
        if (o_dmr.ॱ() == null) {
            Logger.ˋ("DispatchQueue", "async item error:dispatchBlock is null");
        } else if (o_dmr.ˊ() == dmp.SERIAL) {
            o_dmr.ˏ(this.ˏ);
        } else {
            o_dmr.ˊ(this.ˋ.incrementAndGet());
            o_dmr.ˏ(this.ˊ);
        }
    }
}
